package org.neuedu.chapter09_0630.practice07;

public class Test {
    public static void main(String[] args) {
        String str = "sgsfgfABC123fdsgdf都是发给对方法国红酒asfd123";
        char[] chars = str.toCharArray();
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        for (char aChar : chars) {
//            if (Character.isLowerCase(aChar) || Character.isUpperCase(aChar)) {
//                count1++;
//            }else if (Character.isDigit(aChar)) {
//                count2++;
//            }else{
//                count3++;
//            }
            if(aChar >= 'a' && aChar <= 'z' || aChar >= 'A' && aChar <= 'Z'){
                count1++;
            }else if(aChar >= '0' && aChar <= '9'){
                count2++;
            }else{
                count3++;
            }
        }
        System.out.println(count1);
        System.out.println(count2);
        System.out.println(count3);
    }
}
